From: Florian Müllner Date: Thu, 29 Nov 2012 16:58:31 +0000 (+0100) Subject: overview: Handle sessionMode.hasOverview changes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5355 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e00eb06f66aaa41b9ba40db8bb6ef07570629dc1;p=gnome-shell.git overview: Handle sessionMode.hasOverview changes Currently we assume that either the initial sessionMode will have the overview or none of the pushed modes - starting without the overview and pushing a mode that adds it fails spectacularly. However this is exactly what we are going to do when loading external modes asynchronously - we'll initially use the default mode while the modes are loading, and switch to the mode passed on the command line when finished. So make sure that the overview UI gets initialized properly in that case. https://bugzilla.gnome.org/show_bug.cgi?id=689304 --- diff --git a/js/ui/overview.js b/js/ui/overview.js index 3f1663f33..3c1f03058 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -117,6 +117,7 @@ const Overview = new Lang.Class({ _init: function() { this._overviewCreated = false; + this._initCalled = false; Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated)); this._sessionUpdated(); @@ -204,6 +205,9 @@ const Overview = new Lang.Class({ this._lastActiveWorkspaceIndex = -1; this._lastHoveredWindow = null; this._needsFakePointerEvent = false; + + if (this._initCalled) + this.init(); }, _sessionUpdated: function() { @@ -216,6 +220,8 @@ const Overview = new Lang.Class({ // signal handlers and so forth. So we create them after // construction in this init() method. init: function() { + this._initCalled = true; + if (this.isDummy) return;